package com.cloud.sso.common.page;

import lombok.Data;

@Data
public class BasePage {

    //页码
    private Integer pageNum;

    //每页数据开始索引
    private Integer startIndex;

    //每页数据大小
    private Integer pageSize = 10;

    public BasePage() {
    }

    public void setStartIndex() {
        if (pageNum == null || pageNum <= 0) {
            this.startIndex = 0;
        } else {
            this.startIndex = (pageNum - 1) * pageSize;
        }

    }
}
